source(here::here("code/load.R"))

here("data/meta_analyses_raw/AwaBelEst2020/muaa016_suppl_supplementary_2.xlsx") |>
  read_excel(skip = 1) |>
  fill(`Author(s)`, Year) |>
  mutate(meta_id = "AwaBelEst2020",
           subfield = "PA",
           question = "What are the organizational benefits of public service motivation?",
           study_id = paste(`Author(s)`, Year),
           std.error = if_else(is.na(`St. Error`),
                               abs(coefficient / `T COMPUTED`),
                               `St. Error`),
         overall_effect = "no") |>
  select(meta_id,
           subfield,
           question,
           study_id,
           study_year = Year,
           estimate = coefficient,
           p.value = `p value`,
           std.error,
           statistic_t = `T COMPUTED`,
           dv = `Meta DV`,
         overall_effect) |> 
  write_csv(here("data/meta_analyses_clean/AwaBelEst2020.csv"))
